package com.example.cloud.model.business.medical;

import com.alibaba.fastjson.annotation.JSONField;
import com.example.cloud.model.common.CommonModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by wangtao on 2018/7/24.
 * 执行记录
 */
@Entity(name = "execute_record")
@Data
@EqualsAndHashCode(callSuper = false)
public class ExecuteRecord extends CommonModel {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    // 患者ID
    @Column(name = "patient_id")
    private Long patientId;
    // 主诉ID
    @Column(name = "complaint_id")
    private Long complaintId;
    // 医嘱主键
    @Column(name = "order_id")
    private Long orderId;
    // 治疗类型
    @Column(name = "treat_type")
    private int treatType;
    // 执行状态 0: 未执行 1：执行
    @Column(name = "status", columnDefinition = "INT DEFAULT 0")
    private int status;
    // 具体商品信息
    @Column(name = "item_type")
    private int itemType;
    @Column(name = "item_id")
    private Long itemId;
    @Column(name = "item_name")
    private String itemName;
    // 医生
    @Column(name = "doctor_name")
    private String doctorName;
    // 医生备注
    @Column(name = "doctor_remark")
    private String doctorRemark;
    // 来源
    @Column(name = "source")
    private String source;
    // 费用
    @Column(name = "cost")
    private BigDecimal cost;
    // 总次数
    @Column(name = "total_count")
    private int totalCount;
    // 剩余次数
    @Column(name = "lave_count")
    private int laveCount;
    // 医嘱时间
    @JSONField(format = "yyyy-MM-dd")
    @Column(name = "medical_time")
    private Date medicalTime;
    // 停止医生
    @Column(name = "stop_doctor_name")
    private String stopDoctorName;
    // 停止护士
    @Column(name = "stop_nurse_name")
    private String stopNurseName;
    // 停止时间
    @JSONField(format = "yyyy-MM-dd")
    @Column(name = "stop_time")
    private Date stopTime;
    // 执行内容
    @Column(name = "execute_content")
    private String executeContent;
}
